<script setup lang='ts'>
import { PropType } from 'vue'
import {IconConfig} from '@/api/config'
import svgIcon from '@/components/svgIcon.vue'

defineProps({
  iconConfig:{
    type:Object as PropType<IconConfig>,
    required:true
  }
})
</script>

<template>
  <svg-icon v-if="iconConfig.type==='custom'" class="d-common-hover d-common-svg" :name="iconConfig.icon" :color="iconConfig.color" :size="iconConfig.size" />
  <el-icon v-else-if="iconConfig.type==='el'" class="d-common-hover d-common-svg" :color="iconConfig.color" :size="iconConfig.size">
    <component :is="iconConfig.icon" />
  </el-icon>
</template>

<style scoped>

</style>